﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HgCo.WindowsLive.SkyDrive.TotalCommander.Plugins.Forms
{
    /// <summary>
    /// Represents a window for displaying webfile information.
    /// </summary>
    internal partial class SkyDriveWfxFileInfoForm : Form
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SkyDriveWfxFileInfoForm"/> class.
        /// </summary>
        internal SkyDriveWfxFileInfoForm(WebFileInfo webFile, Image webFileIcon)
        {
            InitializeComponent();

            this.Icon = Resources.SkyDriveWfx.mini_storage;

            txtName.Text = webFile.FullName;
            txtDescription.Text = webFile.Description;
            txtCreatorName.Text = webFile.CreatorName;
            txtShareType.Text = webFile.ShareType.ToString();
            txtContentType.Text = webFile.ContentType.ToString();
            txtSize.Text = webFile.Size;
            txtDateAdded.Text = webFile.DateAdded.ToString();
            txtDateModified.Text = webFile.DateModified.ToString();
            txtViewUri.Text = webFile.ViewUri != null ? webFile.ViewUri.ToString() : String.Empty;

            picboxIcon.Image = webFileIcon;
        }
    }
}
